<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="websql.Query"%>
<%@page import="unit.EscapeUnescape"%>
<%@page import="websql.Var"%>
<%@page import="websql.Conn"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>


</head>
<body>

<%
	request.setCharacterEncoding("UTF-8");
%>

<select id="qid" name="qid" onchange="showqid()">

	<option>请选择一个查询脚本</option>
	<%
		String scid = request.getParameter("cid");
		if (!scid.equals("")) {

			int cid = Integer.parseInt(scid);
			String[] qnames = Query.getQueryNames(cid);
			for (int i = 0; i < qnames.length; i++) {
				out.print("<option value =\""
						+ Query.getqid("qname", EscapeUnescape
								.escape(qnames[i])) + "\">" + qnames[i]
						+ "</option>");
			}
		}
	%>
</select>
<div id='query'></div>
</body>
</html>